import { API_DOMAINS, http } from '@/http/request/alova'
// 视频分类
export interface CategoryBasic {
  id: number
  name: string
  [key: string]: any
}

// 获取分类数据
export function getCategory() {
  return http.Get<CategoryBasic[]>('/api/video/videotype', {
    meta: { domain: API_DOMAINS.SECONDARY }, // 用于切换请求地址
  })
}

// 获取分类下的视频列表
export function getVideoData(params?: AnyObject) {
  return http.Get<CategoryBasic[]>('/api/video/videolst', {
    params,
    meta: { domain: API_DOMAINS.SECONDARY }, // 用于切换请求地址
  })
}
